import { defineStore } from 'pinia';
import { adminLevel } from "../modules/AppConfig";

export const useAccountStore = defineStore('account', {
  state: () => ({ 
    isLoggedIn:false,
    // "" if not logged in
    account: "",
    // >=adminLevel have access to management center
    level:0
   }),
  getters: {
    canVisitManagement: state => state.isLoggedIn&&state.level>=adminLevel,
  },
  // actions: {
  //   increment() {
  //     this.count++
  //   },
  // },
})
